<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta name="content-type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta name="description" content="">
    <meta name="keywords" content="手机 电视">
    <title>传智书城</title>
    <%@ include file="style.jsp" %>
    <link rel="stylesheet" href="css/list.css">
</head>

<body>

<%@ include file="start.jsp" %>
<!--  导航 end -->
<%@ include file="header.jsp" %>
<!--  header end -->
    <!--  header end -->
    <!-- 中间分类  start -->
    <!-- 中间分类  start -->
    <div class="submena clearfix">
        <span class="layui-breadcrumb" lay-separator=">">
            <a href="${pageContext.request.contextPath}/shop/client">首页</a>
            <a><cite>搜索</cite></a>
        </span>
    </div>
    <div class="center_con clearfix">
        <h4 class="goodslist-title">${category == 'all'?"全部":category}</h4>
        <img src="images/productlist.gif" alt="" class="productlist-img">
        <div class="goods">
            <div class="layui-tab-content" >
                <c:if test="${searchList.size()==0}">
                    <h2>没有搜索到相关数据</h2>
                </c:if><div class="layui-tab-item layui-show">
                    <ul>
                        <c:forEach items="${searchList}" var="item">
                            <li>
                                <a href="${pageContext.request.contextPath}/shop/client/book?id=${item.id}">
                                    <div class="card">
                                        <div class="card_img"><img src="${pageContext.request.contextPath}/shop/client/${item.imgurl}" alt=""></div>
                                        <div class="card_info">
                                            <h2>书名: <span>${item.name}</span></h2>
                                            <h2>售价: ￥<span>${item.price}</span></h2>
                                        </div>
                                    </div>
                                </a>
                            </li>
                        </c:forEach>
                    </ul>
                </div>
            </div>
        </div>
        <!-- 页码 -->
        <div id="page" style="transform: translateX(34%);"></div>

    </div>
    <!--  footer start -->
<%@include file="footer.jsp"%>

<script>
        layui.use('laypage', function () {
            var laypage = layui.laypage;

            //执行一个laypage实例
            laypage.render({
                elem: 'page' //注意，这里的 test1 是 ID，不用加 # 号
                , count: 50 //数据总数，从服务端得到
            });
        });
    </script>
</body>

</html>